﻿using System;
using System.Collections.Generic;
using InventoryBackupProductDAO = BotonJXC.DAO.InventoryBackupProductDAO;
using BotonJXC.Util;
using NHibernate.Criterion;
using BotonJXC.Entity;

namespace BotonJXC.BLL
{
    public class InventoryBackupProductBLL : BaseBLL<InventoryBackupProductDAO, InventoryBackupProduct, int>
    {
        public InventoryBackupProductBLL()
        {
        }

        public PageModel<InventoryBackupProduct> Find(int backupId, int start, int count)
        {
            List<ICriterion> criterions = new List<ICriterion>();
            if (backupId > 0)
            {
                criterions.Add(Restrictions.Eq("InventoryBackup.BackupId", backupId));
            }

            return Dao.FindByPage(criterions.ToArray(), null, start, count);
        }
    }
}